<template>
  <div>
    <LayoutCommonSection>
      <UiFormEdition :model="Cycle" go-back-route="/parameters/teaching">
        <template #default="{ entity }">
          <UiInputText
            v-if="entity !== null"
            v-model="entity.label"
            field="label"
            :rules="getAsserts('label')"
          />
        </template>
      </UiFormEdition>
    </LayoutCommonSection>
  </div>
</template>
<script setup lang="ts">
import Cycle from '~/models/Education/Cycle'
import { getAssertUtils } from '~/services/asserts/getAssertUtils'

definePageMeta({
  name: 'cycle',
})

const getAsserts = (key) => getAssertUtils(Cycle.getAsserts(), key)
</script>
